package com.lc.afbx.conn;

import com.zcx.helper.http.AsyCallBack;
import com.zcx.helper.http.note.HttpInlet;

import org.json.JSONObject;

/**
 * Created by Administrator on 2016/6/3.
 */
@HttpInlet(Conn.INLET_API_RECRUITMENT_DETAILS)//商家入驻详情   接口
public class GetApiSJRZDetails extends BaseAsyGet<GetApiSJRZDetails.Info> {
    public String id, tid;

    public GetApiSJRZDetails(AsyCallBack<GetApiSJRZDetails.Info> asyCallBack) {
        super(asyCallBack);
    }

    protected Info parser(JSONObject jsonObject) {

        TOAST = jsonObject.optString("message");
        if (jsonObject.optInt("code") == 200) {

            Info info = new Info();
            JSONObject o = jsonObject.optJSONObject("data");
            Data d = new Data();

            d.title = o.optString("title");
            d.web = Conn.SERVICE + o.optString("web");
            d.picurl = Conn.PIC + o.optString("picurl");
            d.address = o.optString("address");
            d.tel = o.optString("tel");

            info.data = d;

            return info;
        }
        return null;
    }

    public static class Info {
        public Data data;
    }

    public static class Data {
//        "title":"商家名称1",
//                "web":"&lt;p&gt;商家简介内容&lt;/p&gt;"
//                "picurl":"",
//                "address":"黑龙江省哈尔滨市道里区尚志大街160号",
//                "tel":"13116161616"

        public String title, web, picurl, address, tel;
    }
}
